package com.xwj.feign;

import com.xwj.dto.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xwj
 * @date 2020/11/21
 */
@FeignClient(value = "seata-storage-service")
public interface StorageFeignClient {
    /**
     * 调用seata-storage-service服务完成减库存操作
     *
     * @param productId
     * @param count
     * @return
     */
    @PostMapping(value = "/storage/decrease")
    CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
